<!-- <style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style> -->
<template src="./index.html"></template>
<script>
import Edit from "./../edit/index";
import List from "./../list/index";

export default {
    mixins: [
        Vue.prototype.$vFN.Mixins.Base,
        Vue.prototype.$vFN.Mixins.Page,
        Vue.prototype.$vFN.Mixins.Table,
    ],
    data() {
        return {
            // 页面接口地址
            apiUrl: {
                list: "mall-admin/dict-type/list",
                delete: "mall-admin/dict-type/delete",
            },
            // 表格查询数据
            mixinTable_tableSearchData: {
                dictName: "",
                dictType: "",
            },
            // 表格数据
            tableData: [],
            // 表格数据删除展示结构
            tableDeleteConfig: {
                columns: [
                    {
                        label: "名称",
                        prop: "dictName",
                        type: "",
                    },
                    {
                        label: "类型",
                        prop: "dictType",
                        type: "",
                    },
                    {
                        label: "状态",
                        prop: "status",
                        type: "state-icon",
                        options:{
                            success:0,
                            error:1,
                        }
                    },
                    {
                        label: "备注信息",
                        prop: "remark",
                        type: "",
                    },
                ],
                // title: "确定停用以下内容么?",
            },

            // 数据字典
            // 菜单类型
            dict_menu_type: [],
        };
    },
    methods: {
        // 打开添加/修改
        editBoxOpen(params_) {
            Edit.init({
                mixinEdit_parent: this,
                mixinEdit_editType: params_.type,
                id: params_.id,
            });
        },
        // 初始化
        async init() {
            this.mixinTable_initSearchData();
            // 数据字典 运营状态
            this.mixinTable_tableSearchData.dict_menu_type = await this.mixinBase_configDict(
                {
                    type: "menu_type",
                    name: "dict_menu_type",
                }
            );
        },
        // 打开添加/修改
        listBoxOpen(data_) {
            List.init({
                mixinEdit_parent: this,
                mixinList_tableSearchData: {
                    dictType: data_.dictType,
                },
                remark: data_.remark,
            });
        },
    },
    mounted() {
        this.init();
    },
    activated() {},
};
</script>